package com.ywy.bootadmin.task.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

/**
 * 测试任务
 *
 * @author ywy
 * @date 2021/11/3 17:37
 */
@Component
@DisallowConcurrentExecution //作业不并发
public class HelloWorldJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("这是一个定时任务--" + System.currentTimeMillis());
    }
}
